package com.smzd.core.domain;

/**
 * 可以分享的数据基础类。数据拥有owner属性和reference属性。
 * 
 * @author YuZhongda
 *
 * @param <O>
 * @param <K>
 */
public class BaseShareDataEntity<O extends IntIdEntity, K extends IntIdEntity> extends BaseReferenceEntity<K>
		implements IShareData<O, K> {
	private static final long serialVersionUID = 8011857078529559140L;

	protected O owner;

	@Override
	public void setOwner(O owner) {
		this.owner = owner;
	}

	@Override
	public O getOwner() {
		return owner;
	}

	@Override
	protected void extStrings(StringBuffer sb) {
		super.extStrings(sb);
		sb.append(", owner: ").append(owner == null ? null : owner.getId());
	}
}
